7fb94c
@@ -340,11 +340,13 @@
public class HFileV1Detector extends Configured implements Tool {
   private static boolean isTableDir(final FileSystem fs, final Path path) throws IOException {
     // check for old format, of having /table/.tableinfo; hbase:meta doesn't has .tableinfo,
     // include it.
+    if (fs.isFile(path)) return false;
     return (FSTableDescriptors.getTableInfoPath(fs, path) != null || FSTableDescriptors
         .getCurrentTableInfoStatus(fs, path, false) != null) || path.toString().endsWith(".META.");
   }
 
   private static boolean isRegionDir(final FileSystem fs, final Path path) throws IOException {
+    if (fs.isFile(path)) return false;
     Path regionInfo = new Path(path, HRegionFileSystem.REGION_INFO_FILE);
     return fs.exists(regionInfo);
 
